<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>贫困数据查询</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link rel="stylesheet" href="css/amazeui.css"/>
    <link rel="stylesheet" href="css/im.css"/>
    <script src="js/jquery-1.4.2.min.js"></script>
    <script src="js/utils/netRequest.js"></script>
    <script>
        $(document).ready(function () {
            //1代表村查询  2代表户查询
            var query = window.localStorage.getItem("query");
            if (query == 1) {
                clickTwo();
            } else if (query == 2) {
                clickOne();
            } else {
                clickOne();
            }
            localStorage.clear();
        });
    </script>
</head>
<body>
<div class="am-tabs" id="doc-my-tabs">
    <ul class="am-tabs-nav am-nav am-nav-tabs am-nav-justify am-topbar-fixed-top">
        <li id="tabOne" class="am-active"><a>贫困村查询</a></li>
        <li id="tabTwo"><a>贫困户查询</a></li>
    </ul>
    <div class="am-tabs-bd topPadding">
        <div id="contentOne" class="am-tab-panel am-active"><!--贫困村-->
            <br>
            <table class="am-table am-text-middle am-table-nobordered am-table-compact">
                <tbody>
                <tr>
                    <th>市</th>
                    <th>
                        <form>
                            <div class="btn-select im-fp-form-board" id="btn_select_city">
                                <span class="cur-select">请选择</span>
                                <select id="city" onchange="OC_1(this.id)">
                                    <option style="display: none"></option>
                                    <option>选项一</option>
                                    <option>选项二</option>
                                    <option>选项三</option>
                                    <option>选项四</option>
                                    <option>选项五</option>
                                </select>
                            </div>
                        </form>
                    </th>
                </tr>
                <tr>
                    <th>县(区)</th>
                    <th>
                        <form>
                            <div class="btn-select im-fp-form-board" id="btn_select_county">
                                <span class="cur-select">请选择</span>
                                <select id="county"  onchange="OC_1(this.id)">
                                    <option style="display: none"></option>
                                    <option>选项一</option>
                                    <option>选项二</option>
                                    <option>选项三</option>
                                    <option>选项四</option>
                                    <option>选项五</option>
                                </select>
                            </div>
                        </form>
                    </th>
                </tr>
                <tr>
                    <th>乡(镇)</th>
                    <th>
                        <form>
                            <div class="btn-select im-fp-form-board" id="btn_select_town">
                                <span class="cur-select">请选择</span>
                                <select id="town"  onchange="OC_1(this.id)">
                                    <option style="display: none"></option>
                                    <option>选项一</option>
                                    <option>选项二</option>
                                    <option>选项三</option>
                                    <option>选项四</option>
                                    <option>选项五</option>
                                </select>
                            </div>
                        </form>
                    </th>
                </tr>
                <tr>
                    <th>村</th>
                    <th>
                        <form>
                            <div class="btn-select" id="btn_select_village">
                                <span class="cur-select">请选择</span>
                                <select id="village"  onchange="OC_1(this.id)">
                                    <option style="display: none"></option>
                                    <option>选项一</option>
                                    <option>选项二</option>
                                    <option>选项三</option>
                                    <option>选项四</option>
                                    <option>选项五</option>
                                </select>
                            </div>
                        </form>
                    </th>
                </tr>
                <tr>
                <th>年度</th>
                <th>
                    <form>
                        <div class="btn-select" id="btn_select_year">
                            <span class="cur-select">请选择</span>
                            <select id="year"  onchange="OC_1(this.id)">
                                <option style="display: none"></option>
                                <option>2014</option>
                                <option>2015</option>
                                <option>2016</option>
                                <option>2017</option>
                                <option>2018</option>
                                <option>2019</option>
                                <option>2020</option>
                            </select>
                        </div>
                    </form>
                </th>
                </tr>
                <tr>
                    <th>村属性</th>
                    <th>
                        <form>
                            <div class="btn-select" id="btn_select_property">
                                <span class="cur-select">请选择</span>
                                <select id="property"  onchange="OC_1(this.id)">
                                    <option style="display: none"></option>
                                    <option>贫困村</option>
                                    <option>非贫困村</option>
                                    <option>经济薄弱村</option>
                                    <option>十二五贫困村</option>
                                    <option>十三五贫困村</option>
                                </select>
                            </div>
                        </form>
                    </th>
                </tr>
                <tr>
                    <th>条件运算符</th>
                    <th>
                        <form>
                            <div class="btn-select" id="btn_select_condition">
                                <span class="cur-select">请选择</span>
                                <select id="condition"  onchange="OC_1(this.id)">
                                    <option style="display: none"></option>
                                    <option>或者</option>
                                    <option>并且</option>
                                </select>
                            </div>
                        </form>
                    </th>
                </tr>
                </tbody>
            </table>
            <div align="center">
                <button type="button" class="am-btn am-btn-primary am-radius im-fp-bt-select" onclick="villageQuery()">查询</button>
            </div>
        </div>


        <div id="contentTwo" class="am-tab-panel"><!--贫困户-->
            <br>
            <table class="am-table am-text-middle am-table-nobordered am-table-compact">
                <tbody>
                <tr>
                    <th>乡(镇)</th>
                    <th>
                        <form>
                            <div class="btn-select" id="btn_select_11">
                                <span class="cur-select">请选择</span>
                                <select id="info11"  onchange="OC_1(this.id)">
                                    <option style="display: none"></option>
                                    <option>选项一</option>
                                    <option>选项二</option>
                                    <option>选项三</option>
                                    <option>选项四</option>
                                    <option>选项五</option>
                                </select>
                            </div>
                        </form>

                    </th>
                </tr>
                <tr>
                    <th>村</th>
                    <th>
                        <form>
                            <div class="btn-select" id="btn_select_22">
                                <span class="cur-select">请选择</span>
                                <select id="info22"  onchange="OC_1(this.id)">
                                    <option style="display: none"></option>
                                    <option>选项一</option>
                                    <option>选项二</option>
                                    <option>选项三</option>
                                    <option>选项四</option>
                                    <option>选项五</option>
                                </select>
                            </div>
                        </form>

                    </th>
                </tr>
                <tr>
                    <th>自然村</th>
                    <th>
                        <form>
                            <div class="btn-select" id="btn_select_33">
                                <span class="cur-select">请选择</span>
                                <select id="info33"  onchange="OC_1(this.id)">
                                    <option style="display: none"></option>
                                    <option>选项一</option>
                                    <option>选项二</option>
                                    <option>选项三</option>
                                    <option>选项四</option>
                                    <option>选项五</option>
                                </select>
                            </div>
                        </form>

                    </th>
                </tr>
                <tr>
                    <th>识别标准</th>
                    <th>
                        <form>
                            <div class="btn-select" id="btn_select_44">
                                <span class="cur-select">请选择</span>
                                <select id="info44" onchange="OC_1(this.id)">
                                    <option style="display: none"></option>
                                    <option>国家标准</option>
                                    <option>省定标准</option>
                                    <option>市定标准</option>
                                </select>
                            </div>
                        </form>

                    </th>
                </tr>
                <tr>
                    <th>脱贫属性</th>
                    <th>
                        <form>
                            <div class="btn-select" id="btn_select_55">
                                <span class="cur-select">请选择</span>
                                <select id="info55" onchange="OC_1(this.id)">
                                    <option style="display: none"></option>
                                    <option>未脱贫</option>
                                    <option>脱贫</option>
                                    <option>预脱贫</option>
                                    <option>返贫</option>
                                </select>
                            </div>
                        </form>

                    </th>
                </tr>
                <tr>
                    <th>贫困户属性</th>
                    <th>
                        <form>
                            <div class="btn-select" id="btn_select_66">
                                <span class="cur-select">请选择</span>
                                <select id="info66"  onchange="OC_1(this.id)">
                                    <option style="display: none"></option>
                                    <option value="1">一般贫困户</option>
                                    <option value="2">低保户</option>
                                    <option value="3">五保户</option>
                                    <option value="4">低保贫困户</option>
                                    <option value="5">一般农户</option>
                                </select>
                            </div>
                        </form>
                    </th>
                </tr>
                <tr>
                    <th>戶主姓名</th>
                    <th>
                        <form>
                            <input type="text" style="width: 200px" class="am-form-field im-fp-input">
                        </form>
                    </th>

                </tr>

                <tr>
                    <th>证件号码</th>
                    <th>
                        <form>
                            <input type="text" style="width: 200px" class="am-form-field im-fp-input">
                        </form>
                    </th>
                </tr>
                </tbody>
            </table>
            <div align="center">
                <button type="button" class="am-btn am-btn-primary am-radius im-fp-bt-select">查询</button>
            </div>
        </div>
    </div>
</div>


<script>
    //    导航栏
    $(function () {
        $('#doc-my-tabs');
    });
    $('#tabTwo').click(function () {
        clickTwo();

    });
    $('#tabOne').click(function () {
        clickOne();
    });
    function clickTwo() {
        $("#tabOne").removeClass("am-active");
        $("#contentOne").removeClass("am-active");
        $("#tabTwo").attr("class", "am-active");
        $("#contentTwo").addClass("am-active");
    }
    function clickOne() {
        $("#tabTwo").removeClass("am-active");
        $("#contentTwo").removeClass("am-active");
        $("#tabOne").attr("class", "am-active");
        $("#contentOne").addClass("am-active");
    }

    //下拉栏js
    var $$ = function (id) {
        return document.getElementById(id);
    };

    function OC_1(i) {
        var btnSelect1;

        switch (i) {
            case 'city':
                btnSelect1 = $$("btn_select_city");
                break;
            case 'county':
                btnSelect1 = $$("btn_select_county");
                break;
            case 'town':
                btnSelect1 = $$("btn_select_town");
                break;
            case 'village':
                btnSelect1 = $$("btn_select_village");
                break;
            case 'year':
                btnSelect1 = $$("btn_select_year");
                break;
            case 'property':
                btnSelect1 = $$("btn_select_property");
                break;
            case 'condition':
                btnSelect1 = $$("btn_select_condition");
                break;
            case 'info11':
                btnSelect1 = $$("btn_select_11");
                break;
            case 'info22':
                btnSelect1 = $$("btn_select_22");
                break;
            case 'info33':
                btnSelect1 = $$("btn_select_33");
                break;
            case 'info44':
                btnSelect1 = $$("btn_select_44");
                break;
            case 'info55':
                btnSelect1 = $$("btn_select_55");
                break;
            case 'info66':
                btnSelect1 = $$("btn_select_66");
                break;
            default:
                break;
        }
        var curSelect1 = btnSelect1.getElementsByTagName("span")[0];
        var chgSelect1 = $$(i);
        curSelect1.innerHTML = chgSelect1.value;
        console.log(chgSelect1.value);
    }
    function villageQuery() {

    }
</script>
</body>
</html>